<template>
  <div id="app" class="main-vue">
    <div id="nav">
      <!-- 基座内部的路由 -->
      <h3>主应用定义路由：</h3>
      <h5>jquery子应用路由</h5>
      <router-link to="/sub-jquery">jquery</router-link> |
      <h5>vue子应用路由</h5>
      <router-link to="/sub-vue">Vue</router-link> |
      <router-link to="/sub-vue/repos">Vue-repos</router-link> |
      <router-link to="/sub-vue/about">Vue-about</router-link> |
      <br>
      <h5>react子应用路由</h5>
      <router-link to="/sub-react">React</router-link> |
      <router-link to="/sub-react/repos">React-repos</router-link> |
      <router-link to="/sub-react/about">React-about</router-link> |
    </div>
    <hr />
    <!-- 主应用路由出口 -->
    <div>
      <h3>加载主应用路由：</h3>
      <router-link to="/home">Vue-Main-home</router-link> |
      <router-link to="/about">Vue-Main-about</router-link> |
      <h5>主应用路由出口：</h5>
      <router-view />
    </div>
    <hr />
    <h3>挂载子应用：</h3>
    <div id="container" style="width: 100%; height: 400px"></div>
  </div>
</template>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
